package com.zy.gpdemo.utils;

import java.io.IOException;
import java.util.Properties;

public class PropertiesUtil {
    private final Properties properties = new Properties();

    public PropertiesUtil(String fileName) {
        loadFile(fileName);
    }

    private void loadFile(String fileName){
        try {
            properties.load(PropertiesUtil.class.getClassLoader().getResourceAsStream(fileName));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public  String getPropertyValue(String key){
        return properties.getProperty(key);
    }
}
